@import "~themes/vars.less";

:global {
  .ant-layout-header {
    padding: 0;
  }
  .ant-layout-sider {
    transition: all 0.3s;
    .ant-menu-root {
      height: ~"calc(100vh - 82px)";
      overflow-x: hidden;
      border-right: none;
      background: #363943;
      &::-webkit-scrollbar-thumb {
        background-color: transparent;
      }

      &:hover {
        &::-webkit-scrollbar-thumb {
          background-color: rgba(0, 0, 0, 0.2);
        }
      }
    }

    .ant-menu {
      .ant-menu-item,
      .ant-menu-submenu-title {
        overflow: hidden;
        white-space: normal;
      }
    }
  }
  .ant-layout-footer {
    text-align: center;
    padding: 0 24px;
    height: 40px;
    font-size: 12px;
    line-height: 40px;
  }

  .ant-back-top {
    right: 50px;
  }

  .ant-switch.ant-switch-large {
    line-height: 24px;
    height: 26px;

    &:after,
    &:before {
      width: 22px;
      height: 22px;
    }

    &.ant-switch-checked:after,
    &.ant-switch-checked:before {
      margin-left: -23px;
    }
  }
  .flex-vertical-center {
    display: flex;
    align-items: center;
  }
  .ant-form-item {
    margin-bottom: 12px;
  }
  //侧边主菜单
  .ant-menu-vertical .ant-menu-item, 
  .ant-menu-vertical-left .ant-menu-item, 
  .ant-menu-vertical-right .ant-menu-item, 
  .ant-menu-inline .ant-menu-item, 
  .ant-menu-vertical .ant-menu-submenu-title, 
  .ant-menu-vertical-left .ant-menu-submenu-title, 
  .ant-menu-vertical-right .ant-menu-submenu-title, 
  .ant-menu-inline .ant-menu-submenu-title{
    margin-top: 0;
    margin-bottom: 0;
    font-size: 12px;
    padding-left: 15px!important;
    span{
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
  }
  .ant-menu-sub{ 
    .ant-menu-item{
      padding-left: 24px!important;
      padding-right: 12px;
    }
    .ant-menu-submenu-title{
      padding-left: 33px!important;
    }
    .ant-menu-sub{
      .ant-menu-item{
        padding-left:45px!important;
      }
    }
  }
  .ant-menu-vertical .ant-menu-item:not(:last-child), 
  .ant-menu-vertical-left .ant-menu-item:not(:last-child), 
  .ant-menu-vertical-right .ant-menu-item:not(:last-child), 
  .ant-menu-inline .ant-menu-item:not(:last-child){
    margin-bottom: 0;
  }
  .ant-menu-inline-collapsed{
    width: auto;
  }
  .ant-menu-inline-collapsed > .ant-menu-item, 
  .ant-menu-inline-collapsed > .ant-menu-item-group > .ant-menu-item-group-list > .ant-menu-item, 
  .ant-menu-inline-collapsed > .ant-menu-submenu > .ant-menu-submenu-title{
    padding: 0 15px !important;
  }
  // 下拉小三角样式修改
  .ant-menu-root{
    height: ~"calc(100vh - 120px)";
    overflow-y: auto;
    background-color: #363943;
    .ant-menu{
      background-color: #363943;
    }
  }
  .ant-menu-submenu-vertical > .ant-menu-submenu-title .ant-menu-submenu-arrow:before, 
  .ant-menu-submenu-vertical-left > .ant-menu-submenu-title .ant-menu-submenu-arrow:before, 
  .ant-menu-submenu-vertical-right > .ant-menu-submenu-title .ant-menu-submenu-arrow:before, 
  .ant-menu-submenu-inline > .ant-menu-submenu-title .ant-menu-submenu-arrow:before{
    content: '';
    width:0px;
    height:0px;
    background: transparent;
    border-top:6px solid #999;
    border-right:6px solid transparent;
    border-bottom:6px solid transparent;
    border-left:6px solid transparent;
  }
  .ant-menu-submenu-vertical > .ant-menu-submenu-title .ant-menu-submenu-arrow:after, 
  .ant-menu-submenu-vertical-left > .ant-menu-submenu-title .ant-menu-submenu-arrow:after, 
  .ant-menu-submenu-vertical-right > .ant-menu-submenu-title .ant-menu-submenu-arrow:after, 
  .ant-menu-submenu-inline > .ant-menu-submenu-title .ant-menu-submenu-arrow:after{
    content: normal;
  }
  .ant-menu-submenu-open.ant-menu-submenu-inline > .ant-menu-submenu-title .ant-menu-submenu-arrow:before {
    -webkit-transform: rotate(0deg) translate(3px,0);
    transform: rotate(0deg) translate(3px,0);
  }
  .ant-menu-submenu-inline > .ant-menu-submenu-title .ant-menu-submenu-arrow:before {
    -webkit-transform: rotate(-90deg) translate(5px,8px);
    transform: rotate(-90deg) translate(5px,8px);
  }
  .ant-menu-vertical .ant-menu-item:not(:last-child), 
  .ant-menu-vertical-left .ant-menu-item:not(:last-child), 
  .ant-menu-vertical-right .ant-menu-item:not(:last-child), 
  .ant-menu-inline .ant-menu-item:not(:last-child){
    margin-bottom: 0;
  }
  .ant-menu-inline, .ant-menu-vertical, .ant-menu-vertical-left{
    border-right: none;
  }
 
  // 去掉选中边框线效果
  .ant-menu-vertical .ant-menu-item:after, 
  .ant-menu-vertical-left .ant-menu-item:after, 
  .ant-menu-vertical-right .ant-menu-item:after, 
  .ant-menu-inline .ant-menu-item:after{
    content: normal;
  }
  //去掉手势
  .ant-menu-dark .ant-menu-item:hover > .ant-menu-submenu-title > .ant-menu-submenu-arrow:after, 
  .ant-menu-dark .ant-menu-item-active > .ant-menu-submenu-title > .ant-menu-submenu-arrow:after,
   .ant-menu-dark .ant-menu-submenu-active > .ant-menu-submenu-title > .ant-menu-submenu-arrow:after, 
   .ant-menu-dark .ant-menu-submenu-open > .ant-menu-submenu-title > .ant-menu-submenu-arrow:after, 
   .ant-menu-dark .ant-menu-submenu-selected > .ant-menu-submenu-title > .ant-menu-submenu-arrow:after, 
   .ant-menu-dark .ant-menu-submenu-title:hover > .ant-menu-submenu-title > .ant-menu-submenu-arrow:after, 
   .ant-menu-dark .ant-menu-item:hover > .ant-menu-submenu-title:hover > .ant-menu-submenu-arrow:after, 
   .ant-menu-dark .ant-menu-item-active > .ant-menu-submenu-title:hover > .ant-menu-submenu-arrow:after, 
   .ant-menu-dark .ant-menu-submenu-active > .ant-menu-submenu-title:hover > .ant-menu-submenu-arrow:after, 
   .ant-menu-dark .ant-menu-submenu-open > .ant-menu-submenu-title:hover > .ant-menu-submenu-arrow:after, 
   .ant-menu-dark .ant-menu-submenu-selected > .ant-menu-submenu-title:hover > .ant-menu-submenu-arrow:after,
    .ant-menu-dark .ant-menu-submenu-title:hover > .ant-menu-submenu-title:hover > .ant-menu-submenu-arrow:after, 
    .ant-menu-dark .ant-menu-item:hover > .ant-menu-submenu-title > .ant-menu-submenu-arrow:before, 
    .ant-menu-dark .ant-menu-item-active > .ant-menu-submenu-title > .ant-menu-submenu-arrow:before,
    .ant-menu-dark .ant-menu-submenu-active > .ant-menu-submenu-title > .ant-menu-submenu-arrow:before, 
    .ant-menu-dark .ant-menu-submenu-open > .ant-menu-submenu-title > .ant-menu-submenu-arrow:before, 
    .ant-menu-dark .ant-menu-submenu-selected > .ant-menu-submenu-title > .ant-menu-submenu-arrow:before, 
    .ant-menu-dark .ant-menu-submenu-title:hover > .ant-menu-submenu-title > .ant-menu-submenu-arrow:before, 
    .ant-menu-dark .ant-menu-item:hover > .ant-menu-submenu-title:hover > .ant-menu-submenu-arrow:before, 
    .ant-menu-dark .ant-menu-item-active > .ant-menu-submenu-title:hover > .ant-menu-submenu-arrow:before, 
    .ant-menu-dark .ant-menu-submenu-active > .ant-menu-submenu-title:hover > .ant-menu-submenu-arrow:before,
    .ant-menu-dark .ant-menu-submenu-open > .ant-menu-submenu-title:hover > .ant-menu-submenu-arrow:before, 
    .ant-menu-dark .ant-menu-submenu-selected > .ant-menu-submenu-title:hover > .ant-menu-submenu-arrow:before, 
    .ant-menu-dark .ant-menu-submenu-title:hover > .ant-menu-submenu-title:hover > .ant-menu-submenu-arrow:before{
      background: transparent;
    }

}

// 侧边菜单控制
.switchsider {
  height: 32px;
  line-height: 32px;
  background: #414450;
  text-align: center;
  font-size: 18px;
  cursor: pointer;
  transition: @transition-ease-in;

  &:hover {
    color: @primary-color;
    background-color: fade(@primary-color, 15%);
  }
}
// 侧边次级菜单控制
.switchProdSider {
  display: inline-block;
  width: 15px;
  position: absolute;
  left: 0;
  z-index: 999;
  transition: all .8s;
  opacity: 0;
  top: 50%;
  transform: translateY(-50%);
  -webkit-transform: translateY(-50%);
  -moz-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  height: 66px;
  border-bottom: 9px solid transparent;
  border-left: 15px solid #f9f9f9;
  border-right: none;
  border-top: 9px solid transparent;
  cursor: pointer;
  &::after{
    content: '';
    width: 0px;
    height: 0px;
    background: transparent;
    border-top: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 5px solid #2294F5;
    position: absolute;
    top: 50%;
    left: -10px;
    transform: translateY(-50%);
    -webkit-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
  }
  &.show{
    opacity: 1;
  }
}

.mainwrap{
  position: relative;
}
.productbody{
  background-color: @page-bgc;
  left: 0;
  .fullwidth{
    position: absolute;
    width:auto;
    top: 0px;
    bottom: 0px;
    left: 0;
    right: 0px;
    overflow: hidden;
    overflow-y: auto;
    -o-transition: all 0.2s ease;
    -ms-transition: all 0.2s ease;
    -moz-transition: all 0.2s ease;
    -webkit-transition: all 0.2s ease;
    padding:0 ;
    .ant-layout-content{
      padding: 16px ;
      height: ~"calc(100vh - 112px)";
      overflow-y: auto;
    }
  }
  :global {
    .ant-layout-content{
      padding: 16px;
      height: ~"calc(100vh - 112px)";
      overflow-y: auto;
    }
  }
}

// 面包屑
.bread {
  display: flex;
  background: #fff;
  padding: 10px;
  height: 54px;
  box-sizing: border-box;
  align-items: center;
  .goback{
    width: 22px;
    height: 22px;
    margin-right: 5px;
  }
  :global {
    .ant-breadcrumb {
      display: flex;
      align-items: center;
    }
  }
}


.dark {
  .switchtheme {
    background-color: #000d18;
    border-color: #001629;
  }
}

.light {
  :global {
    .ant-layout-sider {
      background: #fff;
    }
  }
}
@media (max-width: 767px) {
  .bread {
    margin-bottom: 12px;
  }

  :global {
    .ant-layout-content {
      padding: 12px;
    }

    .ant-back-top {
      right: 20px;
      bottom: 20px;
    }
  }
}

@keyframes fadeLeftIn {
  0% {
    transform: translateX(5px);
    opacity: 0;
  }

  100% {
    transform: translateX(0);
    opacity: 1;
  }
}
